# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Alexander Fasching <fasching.a91@gmail.com>
# Contributor: Johannes Loethberg <johannes@kyriasis.com>

_pyname=geojson
pkgname="python-$_pyname"
pkgver=3.0.1
pkgrel=2
pkgdesc='Python bindings and utilities for GeoJSON'
url="https://github.com/frewsxcv/$pkgname"
arch=(any)
license=(BSD)
depends=(python)
makedepends=(python-{build,installer,wheel}
             python-setuptools)
_archive="$_pyname-$pkgver"
source=("$_archive.tgz::$url/archive/$pkgver.tar.gz")
sha256sums=('a8afb889855ce7c756fcd78325be6ab51ade3ea2b72f8f41c74d724fc85c1d45')

build() {
	cd "$_archive"
	python -m build -wn
}

check() {
	cd "$_archive"
	python -m unittest discover
}

package() {
	cd "$_archive"
	python -m installer -d "$pkgdir" dist/*.whl
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.rst
}
